
<h1>Service components in <code>ngSanitize</code></h1>



<div class="component-breakdown">
  <div>
    <table class="definition-table">
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
      
      <tr>
        <td><a href="api/ngSanitize/service/$sanitize">$sanitize</a></td>
        <td><p>The input is sanitized by parsing the HTML into tokens. All safe tokens (from a whitelist) are
  then serialized back to properly escaped html string. This means that no unsafe input can make
  it into the returned string, however, since our parser is more strict than a typical browser
  parser, it&#39;s possible that some obscure input, which would be recognized as valid HTML by a
  browser, won&#39;t make it through the sanitizer. The input may also contain SVG markup.
  The whitelist is configured using the functions <code>aHrefSanitizationWhitelist</code> and
  <code>imgSrcSanitizationWhitelist</code> of <a href="api/ng/provider/$compileProvider"><code>$compileProvider</code></a>.</p>
</td>
      </tr>
      
    </table>
  </div>
</div>

